<?php
/*
 * MiniMe - a minimalistic OStatus complient microblogging tool
 * Copyright (C) 2010, Tuomas Koski - koski.tuomas@gmail.com
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

/**
 * This object represents a xml similar to this:
 * (Buzz sends this in the entry.) 
 * <activity:object>
 *	  <activity:object-type>http://activitystrea.ms/schema/1.0/note</activity:object-type>
 *	  <content type="html">Let&amp;#39;s test this to see what we get!</content>
 *	  <buzz:original-content type="text"/>
 *	  <link href="http://www.google.com/buzz/117625412053868084488/R4WHZv5vyFg" type="text/html" rel="alternate"/>
 *	</activity:object>
 * 
 * @author     Tuomas Koski <koski.tuomas@gmail.com>
 * @copyright  Tuomas Koski
 * @license    http://www.gnu.org/licenses/lgpl.txt
 */
class Mm_Atom_Element_ActivityStream_Object extends Mm_Xml_Element_Parent {
    
    const ELEMENT_OBJECT_TYPE    = 'object-type';
    const ELEMENT_LINK_ALTERNATE = 'link';
    const ELEMENT_CONTENT        = 'content';
    
    protected $tagname = "activity:object";
    
    
    
    public function __construct(array $childElements) {
        parent::__construct($childElements);
    }
    
    /**
     * @return Mm_Atom_Element_ActivityStream_ObjectType
     */
    public function getObjectType() {
        return $this->getChildElement(self::ELEMENT_OBJECT_TYPE);
    }
    
    /**
     * @return Mm_Atom_Element_Link
     */
    public function getAlternateLink() {
        return $this->getChildElement(self::ELEMENT_LINK_ALTERNATE);
    }
    
}